E07 Configuring STP
Back to the Material: Loop Detection, part 1 - Ethernet, Spanning-Tree
Video: Instructions for E07
Topology
This exercise follows E05, thus uses its working configuration.
Preparing the topology
Be really precise; update the topology drawing constantly when configuring the network adapters of virtual machines
Be sure to handle the network with one switch powered on
at a time. This is to prevent loops.
- Add a third switch to your topology as the diagram suggests (e.g. by cloning)
- remember to reconfigure the switch 3
- Move the other
lubuntu
virtual machine behind the third switch
Configure all the switches in the network to have tagged and untagged ports accordingly.
- Test the configuration with
Switch1
andSwitch2
on (Switch 3
off)- can the
Lubuntu1
reach its default gateway?
- can the
- Test the configuration with
Switch3
andSwitch2
on (Switch1
off)- can the
Lubuntu2
reach its default gateway?
- can the
Once configuration is complete. We can proceed to the next phase.
Making a loop
- Enable Lubuntu virtual machines and Vyos
- Make the Lubuntu machines ping one another
- Open Task Manager (or other performance indicator) from your computer
- Turn on all the switches, one by one
- Verify how the switches are handling the situation
show ports statistics
from the console of the switch- There should be an immediate increase in transmitted packets related to the CPU usage
- The Task Manager
- Monitor the CPU usage here
If you experience instability/blackouts of the switches; Just turn it off from the VirtualBox window
This will stop the broadcast storm
Enabling STP
- Turn on the switches one at a time
- Enable spanning-tree protocol on all the vlans in the switches
- Enable spanning-tree protocol on the switch
- When done, save the configuration, and boot up all the switches
- Initiate traffic from lubuntu to another
Monitor the state of the Task Manager for CPU spikes.
Investigating port states
- Print out all the
show stpd s0
andshow stpd s0 ports
from all the switches. - Update/draw the spanning-tree topology picture
- What/Where is the Root Switch?
- What are the port states on each switch?
- Hint: Example picture given in the theory material
- Answer the question: Is the root switch position ideal? Are the ports forwarding as you would have expected?
Defining a root switch
- Plan an update to the network by configuring the priority of the switches as you plan
- Power Off/On is required of the switches to elect new Root Switch; so reboot them after configuration
- Print out all the
show stpd s0
andshow stpd s0 ports
from all the switches. - Update/draw the spanning tree topology after the changes
Measuring changes in topology
- Have one of the Lubuntu -machines actively
ping
one another - Select one of the ports from the root switch and disable it with
disable port <#>
- Measure/document the
ping
timeout between devices- You might have to enable/disable the port several times to get desired effect
- Print out all the
show stpd s0
andshow stpd s0 ports
from all the switches. - Update/draw the spanning tree topology after the changes in port states
The ping
timeouts should be visible as follows
64 bytes from 192.168.0.254: icmp_seq=2022 ttl=64 time=3.99 ms
64 bytes from 192.168.0.254: icmp_seq=2023 ttl=64 time=3.11 ms
64 bytes from 192.168.0.254: icmp_seq=2024 ttl=64 time=3.00 ms
64 bytes from 192.168.0.254: icmp_seq=2025 ttl=64 time=3.68 ms
64 bytes from 192.168.0.254: icmp_seq=2031 ttl=64 time=1.89 ms
64 bytes from 192.168.0.254: icmp_seq=2032 ttl=64 time=2.63 ms
64 bytes from 192.168.0.254: icmp_seq=2033 ttl=64 time=1.94 ms
So 2026 - 2030 packets missing when disabling the port
and
64 bytes from 192.168.0.254: icmp_seq=2034 ttl=64 time=1.86 ms
64 bytes from 192.168.0.254: icmp_seq=2035 ttl=64 time=2.35 ms
64 bytes from 192.168.0.254: icmp_seq=2036 ttl=64 time=1.69 ms
64 bytes from 192.168.0.254: icmp_seq=2037 ttl=64 time=2.22 ms
64 bytes from 192.168.0.254: icmp_seq=2038 ttl=64 time=1.82 ms
64 bytes from 192.168.0.254: icmp_seq=2043 ttl=64 time=3.18 ms
64 bytes from 192.168.0.254: icmp_seq=2044 ttl=64 time=1.56 ms
packets 2039 - 2042 missing when enabling the port
Measure the network timeout from your topology!
Back to the Schedule?
License
This course and its materials are written by Karo Saharinen and licenced by Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) license.